package com.amumu.netctoss.vo;

public class DurationClientUsed {

//	账号 ID 	账务帐号 	客户名称 	身份证号码 	电话 	月份 	累积时长
	private Integer accountId;
	private String loginName;
	private String realName;
	private String idcardNo;
	private String telephone;
	private String month;
	private Long duration;
	public Integer getAccountId() {
		return accountId;
	}
	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getIdcardNo() {
		return idcardNo;
	}
	public void setIdcardNo(String idcardNo) {
		this.idcardNo = idcardNo;
	}
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	public String getMonth() {
		return month;
	}
	public void setMonth(String month) {
		this.month = month;
	}
	public Long getDuration() {
		return duration;
	}
	public void setDuration(Long duration) {
		this.duration = duration;
	}
	
	public String toDuration(){
		if(duration==null) return null;
		String str ="";
		long hour = this.duration/3600;
		long minute = (this.duration%3600)/60;
		long second = this.duration%60;
		if(hour>0){
			str+=hour+"小时";
		}
		if(minute>0){
			str+=minute+"分";
		}
		str+=second+"秒";
		return str;
	}
	
	public String toMonth(){
		if(month==null) return null;
		String year = this.month.substring(0, 4)+"年";
		String month = this.month.substring(4);
		if(month.charAt(0)=='0'){
			month = month.charAt(1)+"";
		}
		return year+month+"月";
	}
	
	
}
